#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;
//http://oj33.cn/contest.php?cid=1075
int Array[7000];
int n, m;
int ans[7000] = {};
int sum = 0;
int use[7000];
bool f = 0;
void print(int i) {
	int j = 0;
	for (; j <=i; j++)
	{if(ans[j]!=0)
		cout << ans[j] << " ";
	}
}
void dfs(int k)
{
	for (int i = 0; i < n; i++)
	{
		if (sum < m && !use[i])
		{
			use[i] = 1;
			sum = sum + Array[i];
			ans[k] = Array[i];
			if (sum == m)
			{
				print(i);
				exit(0);
			}
			else
			{
				dfs(i + 1);
			}
			use[i] = 0;
		sum -= Array[i];
		ans[k] -= Array[i];
	}
}
}
int main()
{

	cin >> n >> m;
	for (int i = 0; i < n; i++)
	{
		cin >> Array[i];
		sum += Array[i];
		
	}if (sum < m)
	{
		cout << "No Solution!" << endl;
		return 0;
	}
	sum = 0;
	dfs(0);
	if (f == 0)
		cout << "No Solution!" << endl;
	return 0;
}